package com.eascs.admin.o2o.credit.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eascs.admin.common.service.BaseSevice;
import com.eascs.admin.o2o.credit.dao.CreditReportDao;
import com.eascs.admin.o2o.credit.entity.CreditReport;
@Service
public class CreditReportService extends BaseSevice {
	@Autowired
	private CreditReportDao creditReportDao;
	/**
	 * 查询CreditReport实体 
	 * @param loanapplyNo 主表ID
	 * @param parentId 父类ID
	 * @return
	 */
	public CreditReport queryLoanapplyNo(String loanapplyNo,String parentId){
		return creditReportDao.queryLoanapplyNo(loanapplyNo,parentId);
	}
	/**
	 * 新增实体
	 * @param creditEntity
	 * @return
	 */
	public int saveEntity(CreditReport creditReport){
		return creditReportDao.insert(creditReport);
	}
	/**
	 * 修改实体
	 * @param creditReport
	 * @return
	 */
	public int updateEntity(CreditReport creditReport){
		return creditReportDao.updateById(creditReport);
	}
	/**
	 * 根据ID 查询CreditReprot
	 * @param id
	 * @return
	 */
	public CreditReport getById(String id){
		return creditReportDao.getById(CreditReport.class, id);
	}
}
